<div class="page_panel pull-right" ng-controller="PagedController">
    <ul class="pagination">
        <li ng-class="{disabled : (paged.totalPage <= 1 || paged.pageNo == 1)}">
            <a href="javascript:void(0)" ng-click="index(1)">&lt;&lt;</a>
        </li>
        <li ng-class="{disabled : (paged.totalPage <= 1 || paged.pageNo == 1)}">
            <a href="javascript:void(0)" ng-click="prev()">&lt;</a>
        </li>
        <li ng-if="(paged.totalPage - paged.pageNo) < 4" ng-repeat="i in range(max(paged.pageNo - 9 + (paged.totalPage - paged.pageNo), 1), (paged.pageNo - 6))">
            <a href="javascript:void(0)" ng-click="index(i)">{{ i}}</a>
        </li>
        <li ng-if="paged.pageNo > 1" ng-repeat="i in range(max((paged.pageNo - 5), 1), paged.pageNo - 1)">
            <a href="javascript:void(0)" ng-click="index(i)">{{ i}}</a>
        </li>
        <li ng-class="{active: true}">
            <span>{{ paged.pageNo }}</span>
        </li>
        <li ng-repeat="i in range((paged.pageNo + 1), min((paged.pageNo + 4), paged.totalPage))">
            <a href="javascript:void(0)" ng-click="index(i)">{{ i }}</a>
        </li>
        <li ng-if="paged.pageNo < 6" ng-repeat="i in range(paged.pageNo + 5, min((paged.pageNo + 10 - paged.pageNo), paged.totalPage))">
            <a href="javascript:void(0)" ng-click="index(i)">{{ i}}</a>
        </li>
        <li ng-class="{disabled : (paged.totalPage <= 1 || paged.pageNo == paged.totalPage)}">
            <a href="javascript:void(0)" ng-click="next()">&gt;</a>
        </li>
        <li ng-class="{disabled : (paged.totalPage <= 1 || paged.pageNo == paged.totalPage)}">
            <a href="javascript:void(0)" ng-click="index(paged.totalPage)">&gt;&gt;</a>
        </li>
    </ul>
</div>
<div class="clearfix"></div>